package cn.com.chaochuang.gxfdaoa.pdfserver;

import org.apache.cxf.Bus;
import org.apache.cxf.jaxws.EndpointImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.xml.ws.Endpoint;

/**
 * 2017-12-26
 *
 * @author Shicx
 */
@Configuration
public class CxfConfig {

    @Autowired
    private Bus bus;
    @Autowired
    private PdfWebservice pdfWebservice;

    @Bean
    public Endpoint endpoint() {
        System.out.println("启动pdfWebservice-----------");
        EndpointImpl endpoint = new EndpointImpl(bus,pdfWebservice);
        //服务名
        endpoint.publish("/pdfWebservice");
        return endpoint;
    }
}
